package com.wongsir.springbootdemo.constants;

import lombok.Data;

/**
 * @Description:
 * @author hjd
 * @date 2018年8月13日
 */
@Data
public class ResultMsg {
	private int errorCode;  //错误码
	private String msg;		//提示信息
	private Object data;	//实际的返回结果
	
	public ResultMsg() { //初始化
		this.errorCode = ErrorCode.UNKNOW.getValue();
		this.msg = "";
		this.data = null;
	}
	public ResultMsg(int errorCode, String msg, Object data) {
		this.errorCode = errorCode;
		this.msg = msg;
		this.data = data;
	}
	
	public void setResultInfo(int err,String msg,Object data){
		this.errorCode = err;
		this.msg = msg;
		this.data = data;
	}
}
